#! /bin/bash

mkdir -p ./tests_out/
rm -rf ./tests_out/*.txt

for ((  i = 1 ;  i <= 13;  i++  ))
do
  	echo "Running test #$i"
  	./tester $i
  
  	# check return value
	if [ $? != 0 ] 
	then 
  		echo "Test #$i retured error code!"
  	fi

	if [ -e ./out1.txt ]  
	then
	  mv ./out1.txt ./tests_out/test_num_${i}_1.txt
	fi

	if [ -e ./out2.txt ]
	then
	  mv ./out2.txt ./tests_out/test_num_{$i}_2.txt
	fi 
  
done
